-- card: 62300 from stack: in -- bmap block id: 0 -- flags: 0000 -- background id: 4755 -- name: -- part 1 (field) -- low flags: 00 -- high flags: 0007 -- rect: left=30 top=78 right=296 bottom=478 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 4 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: -- part 2 (button) -- low flags: 00 -- high flags: 0001 -- rect: left=13 top=29 right=57 bottom=351 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: New Button -- part contents for background part 4 ----- text ----- File 1 of 2 demonstrating a suggested TC root class: -- part contents for card part 1 ----- text ----- /* * FILE: class.h * AUTHOR: R.G. * CREATED: August 4, 1990 * * Defines Generic_Class root class and declares alternate * object allocation/deallocation functions. */ # define _H_class # define INDIRECT /* Means Think C will use handles for objects and move object memory * occasionally. If there are many objects, undefining this may * speed things up. */ # define TRUE 1 # define FALSE 0 typedef int boolean; /****************************************************************** * abstract Generic_Class definition ******************************************************************/ # ifdef INDIRECT struct Generic_Class:indirect # else struct Generic_Class:direct # endif { boolean init(void); boolean destroy(void); }; /****************************************************************** * Function to simulate automated initialization. * * This function does not work with C++, as discussed in the * source file. Instead a macro may be used in conjunction with * a simpler function cond_init(): * * # define new_init(cclass) cond_init(new(cclass)) * * Here, cond_init() should accept a newly-created object as its * argument and return either the successfully initialized object * or NULL. ******************************************************************/ void *new_init(void*); /****************************************************************** * Function to simulate automated deallocation. ******************************************************************/ void destroy_delete(Generic_Class*); -- part contents for background part 7 ----- text ----- 210 -- part contents for background part 6 ----- text ----- Root class for TC using automated constructors/destructors -- part contents for background part 17 ----- text ----- p3